import httpRequest from '@/request'
import appConfig from '@/config/index'

// 产品列表
export function productList () {
  return httpRequest({
    url: `${appConfig.api}firmware/listProduct`,
    method: 'post'
  })
}

// 产品列表分页
export function productListPage (params: any) {
  return httpRequest({
    url: `${appConfig.api}product/list`,
    method: 'post',
    data: params
  })
}

// 新增产品
export function productInsert (params: any) {
  return httpRequest({
    url: `${appConfig.api}product/create`,
    method: 'post',
    data: params
  })
}

// 编辑产品
export function productUpdate (params: any) {
  return httpRequest({
    url: `${appConfig.api}product/update`,
    method: 'post',
    data: params
  })
}

// 删除产品
export function productDelete (params: any) {
  return httpRequest({
    url: `${appConfig.api}product/delete`,
    method: 'post',
    data: params
  })
}
